# UI文件翻译
UIC := pyside2-uic
INSTALLER := pyinstaller

all: ${UI_OBJS} woscopus

woscopus:
	${UIC} design/ui.ui -o design/ui.py
	${INSTALLER} -F --contents-directory . --exclude-module PyQt5 -i ico/woscopus.ico --add-data ico/woscopus.ico:ico --name $@ main.py

.PHONY: reqs clean ui

reqs:
	pipreqs ./ --encoding=utf8 --force

clean:
	del /s /q build\*.* dist *.spec
	rmdir /s /q build dist

ui:
	${UIC} design/ui.ui -o design/ui.py
